package com.qf.ayc.utils;

import java.util.HashMap;

/**
 * 用来封装接口返回的数据
 */
public class ResultVo extends HashMap {

    public static ResultVo ok(String code, String msg, Object data){
        ResultVo result = new ResultVo();
        result.put("code",code);
        result.put("msg",msg);
        result.put("data",data);
        return result;
    }
    public static ResultVo ok(String code, String msg){
        ResultVo result = new ResultVo();
        result.put("code",code);
        result.put("msg",msg);
        return result;
    }
    public static ResultVo notok(String code, String msg){
        ResultVo result = new ResultVo();
        result.put("code",code);
        result.put("msg",msg);
        return result;
    }

}
